using System.Collections.Generic;

namespace lucere.index.diagnostic
{
    /// <summary>
    /// Holds the status of each segment in the index. See SegmentInfos
    /// </summary>
    public interface ISegmentInfoStatus 
    {
        /// <summary>
        /// Name of the segment.
        /// </summary>
        string Name { get; set; } 
        /// <summary>
        /// Document count (does not take deletions into account). 
        /// </summary>
        int DocumentCount { get; set; } 
        /// <summary>
        /// True if segment is compound file format.
        /// </summary>
        bool IsCompoundFile { get; set; } 
        /// <summary>
        /// Number of files referenced by this segment. 
        /// </summary>
        int FileCount { get; set; } 
        /// <summary>
        /// Net size (MB) of the files referenced by this segment. 
        /// </summary>
        double SizeInMB { get; set; } 
            
        /// <summary>
        /// Doc store offset, if this segment shares the doc store files 
        /// (stored fields and term vectors) with other segments.  This 
        /// is -1 if it does not share. 
        /// </summary>
        int DocumentStoreOffset  { get; set; }
            
        /// <summary>
        /// String of the shared doc store segment, or null if this 
        /// segment does not share the doc store files. 
        /// </summary>
        string DocumentStoreSegment { get; set; } 
       
        /// <summary>
        /// True if the shared doc store files are compound file format. 
        /// </summary>
        bool IsDocumentStoreCompoundFile { get; set; } 

        /// <summary>
        /// True if this segment has pending deletions. 
        /// </summary>
        bool HasDeletions { get; set; } 

        /// <summary>
        /// Name of the current deletions file name.
        /// </summary>
        string DeletionsFilename { get; set; } 
    
        /// <summary>
        /// Number of deleted documents.
        /// </summary>
        int DeletedCount { get; set; } 

        /// <summary>
        /// True if we were able to open a SegmentReader on this segment.
        /// </summary>
        bool CanOpenReader { get; set; } 

        /// <summary>
        /// Number of fields in this segment. 
        /// </summary>
        int FieldCount { get; set; } 

      
        /// <summary>
        /// True if at least one of the fields in this segment does not omit 
        /// TermFreqAndPositions. AbstractField.SetOmitTermFreqAndPositions 
        /// </summary>
        bool HasProximityData { get; set; } 
            
        /// <summary>
        /// Map that includes certain debugging details that IndexWriter records 
        /// into each segment it creates 
        /// </summary>
        IDictionary<string, string> Diagnostics { get; set; } 

        /// <summary>
        /// Status for testing of field norms (null if field norms could not be tested).
        /// </summary>
        IFieldNormStatus FieldNormStatus { get; set; } 
            
        /// <summary>
        /// Status for testing of indexed terms (null if indexed terms could not be tested).
        /// </summary>
        ITermIndexStatus TermIndexStatus { get; set; } 
            
        /// <summary>
        /// Status for testing of stored fields (null if stored fields could not be tested). 
        /// </summary>
        IStoredFieldStatus StoredFieldStatus { get; set; } 
            
        /// <summary>
        /// Status for testing of term vectors (null if term vectors could not be tested).
        /// </summary>
        ITermVectorStatus TermVectorStatus { get; set; } 
    }
}